Page({
  data: {
    countdown: 5
  },
  onLoad: function () {
    const interval = setInterval(() => {
      let countdown = this.data.countdown;
      countdown--;
      this.setData({
        countdown: countdown
      });
      if (countdown <= 0) {
        clearInterval(interval);
        wx.navigateTo({
          url: '/my/pages/bindPhone/bindPhone' 
        });
      }
    }, 1000);
  }
});
